var app = angular.module('conversionTool', [ 'ui.bootstrap' ]);

app.controller('excelTypeAdaptorCtrl', [
		'$scope',
		'$http',
		function($scope, $http) {

			$scope.isEdit = false;

			$scope.currentDataAdaptor = new Object();
			
			$scope.isDefault = true;
			

			
			$scope.upload = function() {

				if (document.getElementById("excelTemplateFile").value != ""
						&& document.getElementById("excelTemplateFile").value != undefined) {
					return true;
				} 
			}

			$scope.edit = function() {
				$scope.isEdit = true;
			}
			
			
			$scope.filter = function() {
				window.location="/dataAdaptor/filter?dataTemplateId="+$scope.currentDataAdaptor.id;
			}

			$scope.formula = function() {
				window.location="/dataAdaptor/formula?dataTemplateId="+$scope.currentDataAdaptor.id;
			}
			
		} ]);